package com.bsh.repository;

import java.util.List;

import javax.annotation.Resource;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Repository;

import com.bsh.api.params.DtoBankInfo;
import com.bsh.mybatis.IRepository.BankMapper;
import com.bsh.mybatis.IRepository.UserBankMapper;
import com.bsh.mybatis.model.Bank;

@Repository
public class DaoBank {
	
	@Resource
	SqlSessionTemplate session;
	UserBankMapper getUserBankMapper(){
		return session.getMapper(UserBankMapper.class);
	}
	@Resource
	JdbcTemplate jdbcTemplate;
	@Resource
	NamedParameterJdbcTemplate namedJdbcTemplate;

	BankMapper getMapper() {
		return session.getMapper(BankMapper.class);
	}

	public Bank selectByPrimaryKey(Integer id){
		return getMapper().selectByPrimaryKey(id);
	}
	
	public List<DtoBankInfo> queryBankList(){
		return getMapper().queryBankList();
	}
	
	
}
